<template>
  <div class="app">
    <h2>自己的性别：{{ gender }}</h2>
    <Child :gender="gender" :updateGender="updateGender"/>
  </div>
</template>

<script>
  import Child from "./components/Child";

  export default {
    name:'App',
    components:{Child},
    data() {
      return {
        gender:'female'
      }
    },
    methods: {
      updateGender(value){
        this.gender = value
      }
    },
  }
</script>

<style>
  .app {
    background-color: #ddd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
  }
</style>